<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <title>${sysName}</title>
  <meta name="renderer" content="webkit">
  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
  <link rel="stylesheet" href="${resRoot}/layui/css/layui.css" media="all" />
  <link rel="stylesheet" href="${resRoot}/layui/admin/admin.css" media="all" />
	<link id="layuicss-layer" rel="stylesheet" href="${resRoot}/layui/css/modules/layer/default/layer.css" media="all">
</head>
<body>
<div class="layui-fluid">   
          <div class="layui-card">
          <div class="layui-form layui-card-header layuiadmin-card-header-auto"> 
 
<form class="layui-form" action="#" style="margin-top: 20px;margin-bottom:50px;" lay-filter="dataForm"  >
<input type="hidden" id="id" name="id"  >
  <div class="layui-form-item">
    <label class="layui-form-label">姓名</label>
    <div class="layui-input-inline">
	      <input type="text" name="xm" id="xm" value=""  autocomplete="off" placeholder="请输入姓名" class="layui-input" lay-verify="required" lay-reqtext="请输入姓名" >
    </div>
    <div class="layui-form-mid layui-word-aux">请输入姓名</div>
  </div>

  <div class="layui-form-item">
    <label class="layui-form-label">年龄</label>
    <div class="layui-input-inline">
	      <input type="text" name="nl" id="nl" value=""  autocomplete="off" placeholder="请输入年龄" class="layui-input" lay-verify="required" lay-reqtext="请输入年龄" >
    </div>
    <div class="layui-form-mid layui-word-aux">请输入年龄</div>
  </div>

  <div class="layui-form-item">
    <label class="layui-form-label">性别</label>
    <div class="layui-input-inline">
	      <input type="text" name="xb" id="xb" value=""  autocomplete="off" placeholder="请输入性别" class="layui-input" lay-verify="required" lay-reqtext="请输入性别" >
    </div>
    <div class="layui-form-mid layui-word-aux">请输入性别</div>
  </div>

  <div class="layui-form-item">
    <label class="layui-form-label">残疾类型</label>
    <div class="layui-input-inline">
	      <input type="text" name="cjlx" id="cjlx" value=""  autocomplete="off" placeholder="请输入残疾类型" class="layui-input" lay-verify="required" lay-reqtext="请输入残疾类型" >
    </div>
    <div class="layui-form-mid layui-word-aux">请输入残疾类型</div>
  </div>

  <div class="layui-form-item">
    <label class="layui-form-label">残疾等级</label>
    <div class="layui-input-inline">
	      <input type="text" name="cjdj" id="cjdj" value=""  autocomplete="off" placeholder="请输入残疾等级" class="layui-input" lay-verify="required" lay-reqtext="请输入残疾等级" >
    </div>
    <div class="layui-form-mid layui-word-aux">请输入残疾等级</div>
  </div>

  <div class="layui-form-item">
    <label class="layui-form-label">学校</label>
    <div class="layui-input-inline">
	      <input type="text" name="xx" id="xx" value=""  autocomplete="off" placeholder="请输入学校" class="layui-input" lay-verify="required" lay-reqtext="请输入学校" >
    </div>
    <div class="layui-form-mid layui-word-aux">请输入学校</div>
  </div>

  <div class="layui-form-item">
    <label class="layui-form-label">学历</label>
    <div class="layui-input-inline">
	      <input type="text" name="xl" id="xl" value=""  autocomplete="off" placeholder="请输入学历" class="layui-input" lay-verify="required" lay-reqtext="请输入学历" >
    </div>
    <div class="layui-form-mid layui-word-aux">请输入学历</div>
  </div>

  <div class="layui-form-item">
    <label class="layui-form-label">专业</label>
    <div class="layui-input-inline">
	      <input type="text" name="zy" id="zy" value=""  autocomplete="off" placeholder="请输入专业" class="layui-input" lay-verify="required" lay-reqtext="请输入专业" >
    </div>
    <div class="layui-form-mid layui-word-aux">请输入专业</div>
  </div>

  <div class="layui-form-item">
    <label class="layui-form-label">学年</label>
    <div class="layui-input-inline">
	      <input type="text" name="xn" id="xn" value=""  autocomplete="off" placeholder="请输入学年" class="layui-input" lay-verify="required" lay-reqtext="请输入学年" >
    </div>
    <div class="layui-form-mid layui-word-aux">请输入学年</div>
  </div>

<div class="layui-form-item">
    <label class="layui-form-label">申请时间</label>
    <div class="layui-input-inline">
    	<input type="text" class="layui-input" id="sqsj" name="sqsj"  onClick="WdatePicker({startDate:'%y-%M-%d 00:00:00',dateFmt:'yyyy-MM-dd HH:mm:ss',alwaysUseStartDate:true});" placeholder="yyyy-MM-dd HH:mm:ss" value="" lay-verify="required" >
    </div>
    <div class="layui-form-mid layui-word-aux">请选择申请时间</div>
  </div>

  <div class="layui-form-item">
    <label class="layui-form-label">毕业院校</label>
    <div class="layui-input-inline">
	      <input type="text" name="byyx" id="byyx" value=""  autocomplete="off" placeholder="请输入毕业院校" class="layui-input" lay-verify="required" lay-reqtext="请输入毕业院校" >
    </div>
    <div class="layui-form-mid layui-word-aux">请输入毕业院校</div>
  </div>

<div class="layui-form-item">
    <label class="layui-form-label">更新时间</label>
    <div class="layui-input-inline">
    	<input type="text" class="layui-input" id="gxsj" name="gxsj"  onClick="WdatePicker({startDate:'%y-%M-%d 00:00:00',dateFmt:'yyyy-MM-dd HH:mm:ss',alwaysUseStartDate:true});" placeholder="yyyy-MM-dd HH:mm:ss" value="" lay-verify="required" >
    </div>
    <div class="layui-form-mid layui-word-aux">请选择更新时间</div>
  </div>


  <div class="layui-form-item">
    <div class="layui-input-block">
      <button class="layui-btn" id=""  lay-submit="" lay-filter="dataSaveSubmit"  type="button">立即提交</button>
      <button type="button" class="layui-btn layui-btn-primary" onclick="backList();" >返回</button>
    </div>
  </div>
</form>
</div>
  </div>
  </div>
<#include "/page/footer.html">
<script>
var id = "${id!}";
$(function(){


$(function(){
	var dataTmp = getDataById(id, "${base}/sys/Cjrkqdxcx/get/" + id)
})
});
function backList() {
	parent.layer.closeAll("iframe");
    //刷新父页面
    parent.location.reload();
}

function removeImg(id) {
	layer.confirm('您是确认删除/查看该图片吗？', {
		  btn: ['确认','查看'] //按钮
		}, function(){
			$("#" + id).attr("src", "");
			layer.msg('已删除！');
		}, function(){
			window.open($("#" + id).attr("src"));
		  //layer.msg('已取消！');
		});
}
layui.use(['form', 'layedit', 'laydate', 'upload'], function(){
  var form = layui.form
  ,layer = layui.layer
  ,layedit = layui.layedit
  ,laydate = layui.laydate;
  
  
  var upload = layui.upload;
  
  // 页面验证，及自定义验证规则 样例 表单验证参考  https://www.layui.com/demo/form.html
  form.verify({
    title: function(value){
      if(value.length == 0){
        return '参数不能为空';
      }
    }
    ,pass: [/(.+){6,12}$/, '密码必须6到12位']
    ,content: function(value){
      layedit.sync(editIndex);
    }
  });
  
  
  form.on('submit(dataSaveSubmit)', function(data){
      var index = layer.msg('加载中...',{icon: 16,time:false,shade:0.8});
      delete data.field.file;
      $.ajax({
			url : "${base}/sys/Cjrkqdxcx/save",
			contentType : "application/json",
         	dataType : 'json',
			data : JSON.stringify(data.field),
          	type:'post',
			async : true,
			success : function(data) {
				layer.close(index);
				console.log(data)
				if(data.code == 1) {
						layer.msg('保存成功！', {
						  icon: 1,
						  time: 2000 //2秒关闭（如果不配置，默认是3秒）
						}, function(){
							backList();
						});   
					} else {
						layer.msg(data.msg); 
					}
			}
		}); 
    });
  
});

layui.use('upload', function(){
	  
});  
</script>
</body>
</html>